<template>
	<view class="page">
		<u-navbar title="当天相关联的计划" safeAreaInsetTop fixed placeholder>
			<view class="coreshop-navbar-left-slot" slot="left">
				<u-icon name="arrow-left" size="19" @click="goNavigateBack"></u-icon>
			</view>
			<view slot="right">
			</view>
		</u-navbar>

		<view class="correlation-plan-list">
			<view v-for="(item) in list" :key="item.jh.ID" class="card">
				<view class="head">
					<view class="lf">
						<view class="title">{{item.jh.GZJH}}</view>
						<div style="display: flex;align-items: center;">
							<u-icon name="account-fill" color="#999" size="16"></u-icon>
							<view class="name">{{item.jh.ChgAccName}}</view>
						</div>
					</view>
					<view class="tag">{{infoTypes[item.jh.JHLX]}}</view>
				</view>
				<div class="content">

				</div>
				<view class="footer">
					要求完成时间：{{String(item.jh.EndDate).replace('T', ' ')}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState,
	} from 'vuex'

	export default {
		data() {
			return {
				list: [{
					jh: {
						AddAcc: "15557167200",
						AddAccName: "林海广",
						AddIP: "36.24.21.227",
						AddTime: "2024-09-21T10:31:28.44",
						ChgAcc: "15557167200",
						ChgAccName: "林海广",
						ChgIP: "36.24.21.227",
						ChgTime: "2024-09-21T10:31:28.44",
						Date: "2024-09-21T00:00:00",
						Deleted: "0",
						EndDate: "2024-09-21T23:59:59",
						GZJH: "2024年09月21日 星期六计划",
						GZZJ: null,
						ID: "7373714948F64F9BB4E91C24DA4B8F87",
						IsFB: "1",
						IsNM: null,
						IsNull: false,
						JHJD: "|7373714948F64F9BB4E91C24DA4B8F87",
						JHLX: "1",
						JHZT: null,
						SJJHID: null,
						YWYID: "BF19F8A6C4F8421BAFB8121A6F17EF49"
					}
				}],
				infoTypes: {}
			};
		},
		onLoad() {
			this.planTypeList.forEach(item => {
				this.infoTypes[Number(item.value)] = item.label
			})
			console.log(this.infoTypes);
		},
		computed: {
			...mapState(['planTypeList']),
		},
	}
</script>

<style lang="scss" scoped>
	.page {
		.correlation-plan-list {
			border-radius: 10px;
			margin: 10px 20px;
			box-shadow: none;

			.card {
				position: relative;
				overflow: hidden;
				font-size: 28rpx;
				background-color: #ffffff;
				box-sizing: border-box;
				border-radius: 10rpx;

				.head {
					display: flex;
					align-items: center;
					justify-content: space-between;
					padding: 10px;

					.name {
						color: #999;
						margin-left: 8rpx;
					}

					.tag {
						font-size: 20rpx;
						padding: 6rpx 12rpx;
						font-size: 30rpx;
						color: #2A8FFC;
						border-color: #2A8FFC;
					}
				}

				.content {
					border-top: 1px solid #f1f1f5;
					padding: 10px;
					border-bottom: 1px solid #f1f1f5;
				}

				.footer {
					padding: 10px;
					text-align: right;
					color: #909399;
				}
			}

		}
	}
</style>